//
//  HYSwitchTableViewCell.m
//  Booking
//
//  Created by Duntech on 2018/4/23.
//  Copyright © 2018年 Duntech. All rights reserved.
//

#import "HYSwitchTableViewCell.h"

@interface HYSwitchTableViewCell ()

/** 标题 */
@property (nonatomic,strong) UILabel *titleLabel;
@property (nonatomic,strong) UISwitch *switchBtn;

@end

@implementation HYSwitchTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self setupSubviews];
    }
    return self;
}

- (void)setupSubviews{
    
    [self addSubview:self.titleLabel];
    [self addSubview:self.switchBtn];

}

- (void)layoutSubviews{
    
    [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        
    }];
    
    [_switchBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        
    }];
}

#pragma mark - lazyload
- (UILabel *)titleLabel{
    
    if (!_titleLabel) {
        
        _titleLabel = [[UILabel alloc] init];
        _titleLabel.font = KFitFont(16);
        _titleLabel.textAlignment = NSTextAlignmentLeft;
        _titleLabel.text = @"会议人数";
        _titleLabel.textColor = KCOLOR(@"272727");
        _titleLabel.adjustsFontSizeToFitWidth = YES;
    }
    return _titleLabel;
}

- (UISwitch *)switchBtn{
    
    if (!_switchBtn) {
        _switchBtn = [UISwitch new];
    }
    return _switchBtn;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
